/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/* 
 * Copyright (c) 2009 City University of Hong Kong
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License m_version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * 
 * Author: Wilson Thong (wilsonwk@ee.cityu.edu.hk) 
 */
#ifndef PATH_DETAIL_CALCULATOR_H
#define PATH_DETAIL_CALCULATOR_H

#include "jitter-sim-include.h"

namespace ns3 {
namespace eecityu {

/**
 * \brief A calculator to obtain detail statistics of paths
 */
class PathDetailCalculator
{
public:  
  PathDetailCalculator(void);
  /**
   * \brief Calculate the distance between source node and the destination
   * \param src The source node from which the distance is measured
   * \param dst The destination node to which the distance is measured
   */
  void Calculate (Ptr<Node> src, Ptr<Node> dst);
  /**
   * \brief Calculate the distance between source node and the destination
   * \param src The source node ID from which the distance is measured
   * \param dst The destination node ID to which the distance is measured
   */
  void Calculate (uint32_t src, uint32_t dst);
  /**
   * \return The distance, in hops, between the source and the destination
   * node that the Calculate () method is just applied to
   */
  uint32_t GetCalculatedHopDistance () const;
  /**
   * \return The total path cost from the source to the destination node
   * that the Calculate () method is just applied to
   */
  int32_t GetCalculatedPathCost () const;

private:
  // store the last calculation result of hop distance between two nodes
  uint32_t m_hopDistance;
  // store the last calculation result of total path-cost between two nodes
  int32_t m_pathCost;
};

} // namespace eecityu
} // namespace ns3

#endif // #ifndef PATH_DETAIL_CALCULATOR_H
